Draft
Conversation
…d DRY refactors - Add async swap quote building via DCA plugin adapter (SwapTxBuilder interface) - Add action result handling with Redis-backed action correlation - Add vault context caching and merging across conversation turns - Add rate limiting middleware for message endpoint - Add docker-compose for local dev (postgres, redis, server) - Migrate auth from JWT to verifier token introspection with in-memory cache - Refactor: extract resolveContext, getPluginSkills, parseRespondToUserResponse helpers - Refactor: deduplicate buildActionResultMessage across confirm/actions - Remove dead code (getIntParam), fix retryDelay dead branch - Remove rename_vault capability - Add tests for context merging, action results, policy building, prompts Co-Authored-By: Claude Opus 4.6 <[email protected]>
…ild_tx - Tighten system prompt: 1-2 sentences max, no preamble, fix typos silently - Enable multi-action batching: app executes auto_execute actions in parallel - Rename build_swap_tx to build_tx with auto_execute=true - Remove rename_vault capability - Revert per-request access token from SwapTxBuilder interface Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Add BuildTx endpoint and swap tx builder integration - Tighten swap confirmation prompt to strict template ending with "Ready to swap?" — no preamble, no narration - Add starter suggestions support - Wire up routes and types Co-Authored-By: Claude Opus 4.6 <[email protected]>
Add build_send_tx to the action table, enum, and prompt instructions so the LLM builds sends inline instead of navigating away. Agent now asks for missing params rather than opening a form. Co-Authored-By: Claude Opus 4.6 <[email protected]>
…o starters - Add Anthropic streaming client with SendMessageStream and SSE parsing - Add ResponseFieldExtractor for incremental JSON response field extraction - Add SSE streaming support to message endpoint (Accept: text/event-stream) - Add read_evm_contract action for reading EVM contract state (allowances, balances) - Add thorchain_query action for THORChain position lookups - Extract ActionsTable as shared constant so starters auto-reflect all capabilities - Add streaming variants for intent, actions, confirm, and policy flows Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Keep feat-agent architecture (respond_to_user tool, client-side actions, SSE streaming) - Adopt main's verifier-based auth (replace JWT auth with /auth/me) - Adopt main's LLM decision loop tools (executor.go, tools.go) alongside existing flow - Fix Messages []any type compatibility (main changed Request.Messages to []any) - Restore extractMemoryUpdate for respond_to_user flow - Remove old auth.go (replaced by verifier middleware) Co-Authored-By: Claude Opus 4.6 <[email protected]>
Restore loop-based ProcessMessage where the LLM drives the conversation by freely picking tools (ToolChoice: "auto") instead of hardcoded ability routing (detectIntent, confirmAction, buildPolicy). New capabilities are added as tools in agentTools() and cases in executeTool(). - Delete intent.go and confirm.go (ability-based routing) - Rewrite agent.go with unified loop (max 8 iterations) - Add RespondToUserTool to agentTools() so LLM chooses when to respond - Unify all input types via resolveUserContent (actions, suggestions, text) - Strip actions.go to buildActionResultUserMessage only - Strip policy.go to convertAmountToBaseUnits/toBaseUnits only - Remove ability-specific prompts (ConfirmActionPrompt, PolicyBuilderPrompt) - Update tests for deleted functions Co-Authored-By: Claude Opus 4.6 <[email protected]>
feat: swap tx building, action system, DCA plugin integration
Openrouter migration
Connects the agent backend to a Vultisig MCP server (optional, via MCP_SERVER_URL) so Claude can discover and call external tools like get_eth_balance and get_token_balance. Adds a set_vault built-in tool that binds vault keys (ECDSA, EdDSA, chaincode) to a conversation. On each request the MCP session is automatically primed with the active vault so address derivation happens server-side without the user repeating keys. Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Add nix flake dev environment with Go, PostgreSQL, Redis, sqlc - Add Transaction type and extract transactions from MCP tool results - Remove redundant public key auth checks (already handled by middleware) - Rename chaincode_hex to chain_code for consistency Co-Authored-By: Claude Opus 4.6 <[email protected]>
Extract token search results from the find_token MCP tool and pass them as structured data in the API response so frontend apps can prompt users to add tokens/chains to their vault. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Two issues prevented the tokens field from appearing in API responses: 1. CallTool discarded text on IsError — when the MCP tool set IsError: true, CallTool returned a Go error and the text content was lost. Now returns a ToolError that carries the text, so executeTool can still pass it to trackToolResult for structured extraction. 2. trackToolResult assumed pure JSON — MCP tools may return multiple text content blocks (joined with \n) or mix descriptive text with JSON. The direct json.Unmarshal failed silently. Now uses extractTokens() which tries direct unmarshal first, then scans for JSON objects in the text using json.Decoder (which handles trailing content). Also adds diagnostic logging when parsing fails so we can see the actual MCP result text in logs. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Integrate MCP resources protocol (resources/list, resources/read) to
discover and load skill guides from the MCP server. Skills are markdown
documents at skills/{slug}.md that provide detailed workflow instructions.
The skill list is injected into the system prompt so the LLM knows what's
available, but skill content is only loaded on-demand via the new get_skill
tool when relevant to the user's request. This keeps the context window
lean as the skill library grows.
- MCP client: add ListSkills, ReadSkill, SkillSummary with TTL caching
- Agent: extend MCPToolProvider interface with skill methods
- Agent: inject skill summary into system prompt after tool descriptions
- Tools: add get_skill native tool (only registered when skills exist)
- Executor: add get_skill handler delegating to MCP ReadSkill
- Main: pre-warm skill cache at startup alongside tools
Co-Authored-By: Claude Opus 4.6 <[email protected]>
The MCP server returns skill resources with URIs like "skill://vultisig/evm-contract-call.md" but extractSkillSlug was filtering for the "skills/" prefix, discarding all entries. - extractSkillSlug now extracts the last path segment before .md, handling any URI scheme (skill://, skills/, etc.) - ReadSkill now looks up the full URI from the skill cache instead of constructing it, so it works with any URI format Co-Authored-By: Claude Opus 4.6 <[email protected]>
…rmat OpenRouter's universal format is OpenAI Chat Completions — it translates that to whatever the underlying model needs. Non-Anthropic models were rejecting our Anthropic Messages API format with "Invalid Anthropic Messages API request". - Rewrite client.go types and wire format (ToolCall, AssistantMessage, ToolMessage, ToolChoice with custom MarshalJSON) - URL: /messages → /chat/completions - System prompt: moved from request field to system message - Tool definitions: InputSchema wrapped as function parameters on wire - Response: parsed from choices[0].message with convenience fields - Streaming: OpenAI SSE format (data: chunks, data: [DONE]) - Update agent.go ProcessMessage/ProcessMessageStream for new types - Rename GetAnthropicTools → GetTools in MCP client and interface Co-Authored-By: Claude Opus 4.6 <[email protected]>
fix: Model naming format
5bb564a to
fb128dc
Compare
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.